test_str = (
    "Hello python ,It become more and more Popular,So more and more programmer start to study and to work in Working so ite adbasdkfa"
    "aslaflasdjl asdlakfj asjfj s"
)

lower_str = test_str.lower()
print("全部变成小写=", lower_str)


# 用于将字符串的第一个字母转换为大写，其他字母转换为小写
capitalize_str = test_str.capitalize()

print("字符串的第一个字母转换为大写，其他字母转换为小写=", capitalize_str)

# 全大写字符串
upper_string = "PYTHON PROGRAMMING"
print(f"全大写字符串: '{upper_string}'")
print(f"转换为小写: '{upper_string.lower()}'")


# 单词首字母大写
title_str = test_str.title()

print("单词首字母大写", title_str)


# caseflod字符串转换为小写，但转换力度更强，适用于国际化字符串

# 定义一个包含特殊字符的字符串
string = "straße"
print("原始字符串:")
print(f"'{string}'")

# 使用casefold()方法转换
casefold_string = string.casefold()
print("\n使用casefold()转换后:")
print(f"'{casefold_string}'")

# 验证转换结果
print(f"\n原始字符串长度: {len(string)}")
print(f"转换后字符串长度: {len(casefold_string)}")
print(f"字符串是否发生变化: {string != casefold_string}")

# 处理不同类型的字符串
print("\n=== 处理不同类型的字符串 ===")

# 德语字符串
german_string = "Grüße"
print(f"德语字符串: '{german_string}'")
print(f"casefold转换: '{german_string.casefold()}'")

# 法语字符串
french_string = "Café"
print(f"法语字符串: '{french_string}'")
print(f"casefold转换: '{french_string.casefold()}'")

# 土耳其语字符串
turkish_string = "İstanbul"
print(f"土耳其语字符串: '{turkish_string}'")
print(f"casefold转换: '{turkish_string.casefold()}'")

# 希腊语字符串
greek_string = "ΣΟΦΙΑ"
print(f"希腊语字符串: '{greek_string}'")
print(f"casefold转换: '{greek_string.casefold()}'")

# 普通英文字符串
english_string = "Hello, World!"
print(f"英文字符串: '{english_string}'")
print(f"casefold转换: '{english_string.casefold()}'")

print(chr(ord("A")).lower())

print("1234".lower())


print("ß".lower())
print("ß".casefold())

print("中国".lower())
print("中国".casefold())
